package mis.ds.ps.util;

import mis.ds.ps.controller.DataController;

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.XMLConfiguration;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class Config {

	private static Logger logger = Logger.getLogger(DataController.class);

	private XMLConfiguration config;

	public Config(String configFile) {
		PropertyConfigurator.configure("log4j.properties");

		try {
			config = new XMLConfiguration(configFile);
		} catch (ConfigurationException cex) {
			logger.debug("Error on loading system configuration on file [" + configFile + "]: " + cex.getMessage());			
		}
	}

	public XMLConfiguration getConfig() {
		return config;
	}
}
